<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改</title>
</head>
<body>
    <form action="/updates" method="post">
    <table th:object="${updates}">
        <tr>
            <td>员工编号：</td>
            <td><input type="text" th:value="*{empno}" name="empno" readonly="true"></td>
        </tr>
        <tr>
            <td>员工姓名：</td>
            <td><input type="text" th:value="*{ename}" name="ename"></td>
        </tr>
        <tr>
            <td>入职日期：</td>
            <td><input type="text" th:value="*{#dates.format(hiredate,'yyyy-MM-dd')}" name="hiredate"></td>
        </tr>
        <tr>
            <td>薪资待遇：</td>
            <td><input type="text" th:value="*{sal}" name="sal"></td>
        </tr>
        <tr>
            <td>部门：</td>
            <td><select name="deptno">
                <option th:each="d:${dept}" th:value="${d.deptno}" th:text="${d.dname}"
                th:selected="${d.deptno==updates.deptno}">部门</option>
            </select></td>
        </tr>
        <tr>
            <td><input type="submit" value="修改"></td>
        </tr>

    </table>
    </form>
</body>
</html>